﻿<UserControl x:Class="SettingsModelWPFDemo.Views.SettingsPages.About"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300"
             
             xmlns:Local="clr-namespace:SettingsModelWPFDemo.Local"
             >
    <Grid>
        <Grid MinWidth="200" Margin="3">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>

            <Grid Grid.Row="0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="18" />
                    <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>

                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>


                <Label Grid.Column="0" Grid.Row="0" Content="{x:Static Local:Strings.STR_ABOUT_Version}" ContentStringFormat="{}{0}:" HorizontalAlignment="Right" Margin="3,6" />
                <Label Grid.Column="2" Grid.Row="0" Content="{Binding AppVersion,Mode=OneTime}" Margin="3" />

                <Label Grid.Row="1" HorizontalAlignment="Right" Content="{x:Static Local:Strings.STR_ABOUT_Copyright}" ContentStringFormat="{}{0}:" Margin="3,6" />
                <Label Grid.Row="1" Grid.Column="2" Content="{Binding AssemblyCopyright, Mode=OneTime}" Margin="3" />

                <Label Grid.Row="2" HorizontalAlignment="Right" Content="{x:Static Local:Strings.STR_ABOUT_Link}" ContentStringFormat="{}{0}:" Margin="3,6" />
                <TextBlock Grid.Row="2" Grid.Column="2" Margin="3">
                    <Hyperlink NavigateUri="{Binding ProjectHyperlink}"
                               Command="{Binding BrowseAboutCommand}"
                               CommandParameter="{Binding ProjectHyperlink}"
                               >
                        <TextBlock Text="{Binding ProjectHyperlink}" />
                    </Hyperlink>
                </TextBlock>

                <Label Grid.Row="3" VerticalAlignment="Top" HorizontalAlignment="Right" Content="{x:Static Local:Strings.STR_ABOUT_Modules}" ContentStringFormat="{}{0}:" Margin="3,6" />
                <Border Grid.Column="2" Grid.Row="3"
                        BorderBrush="{DynamicResource {x:Static SystemColors.ActiveBorderBrushKey}}" BorderThickness="1">
                    <StackPanel>
                        <ListBox Margin="3,9,3,9"
                         ItemsSource="{Binding Modules,Mode=OneTime}"
                         DisplayMemberPath="Value"
                         MaxHeight="300"
                        />
                    </StackPanel>
                </Border>
            </Grid>

        </Grid>
    </Grid>
</UserControl>
